const path = require('path');

module.exports = {
    /* webpack 入口起点 */
    entry: __dirname + '/src/index.js',
    module: {
        rules: [
            {
                test: /\.js$/,
                use: {
                    loader: 'babel-loader',
                    options: {
                        presets: [
                            'babel-preset-env',
                            'babel-preset-stage-0'
                        ]
                    }
                },
            }, {
                test: /\.worker\.js$/,
                use: { loader: "worker-loader" }
            }
        ],
    },
    /* webpack 输出 */
    output: {
        path: path.join(__dirname + '/dist'),
        library: "arktaoStorage",
        libraryTarget: "umd",
        path: path.resolve(__dirname, "dist"),
        publicPath: "/dist/",
        filename: 'arktaoStorage.js',
    
    },
}